﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Map.Data
{
    public class MapPoint2D
    {
        private int _x = 0, _y = 0;
        public int X { get { return _x; } set { _x = value; } }
        public int Y { get { return _y; } set { _y = value; } }

        public MapPoint2D(int x,int y)
        {
            _x = x;
            _y = y;
        }

        public MapPoint3D Index2DAtMapPoint3D()
        {
            return MapPoint3D.Index2DAtMapPoint3D(this);
        }
        public static MapPoint2D  operator -(MapPoint2D thisPint, MapPoint2D targetPoint)
        {
            return new MapPoint2D(thisPint._x - targetPoint._x,
                thisPint._y - targetPoint._y);
        }
        public static MapPoint2D  operator +(MapPoint2D thisPint, MapPoint2D targetPoint)
        {
            return new MapPoint2D(thisPint._x + targetPoint._x,
                thisPint._y + targetPoint._y);
        }
    }
}
